$(document).ready(function(){
	$(".goodsInfo").each(function(){
		$(this).find(".goods_buy").on("click",function(){
			var goods_img = $(this).parent().prev().attr("src");
			var goods_name = $(this).parent().find(".goods_name").text();
			var goods_price = $(this).parent().find(".goods_price").text();
			var goods_sales = $(this).parent().find(".goods_sales").text();
			var goods_comments = $(this).parent().find(".goods_comments").text();
			var goods_integral = $(this).parent().find(".goods_integral").text();
			
			var goods = new Object();
			goods.img = goods_img;
			goods.name = goods_name;
			goods.price = goods_price;
			goods.sales = goods_sales;
			goods.comments = goods_comments;
			goods.integral = goods_integral;
			
			var str = JSON.stringify(goods);
			sessionStorage.setItem("temp",str);
		});
	});
});